package org.example.weather.bigscreen.core.repository;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.shardingsphere.infra.datanode.DataNode;
import org.example.weather.bigscreen.core.entity.StWeatherUpload;

import java.util.Collection;
import java.util.Date;
import java.util.List;

@Mapper
public interface StWeatherUploadMapper {
    int batchInsert(@Param("stWeatherUploads") List<StWeatherUpload> stWeatherUploads);

    List<String> showTablesLike(@Param("dataNodes") Collection<DataNode> dataNodes);

    int createTablesLike(@Param("dataNodes") Collection<DataNode> dataNodes);

    List<String> showAllTablesLike(@Param("dataSourceName") String dataSourceName);

    StWeatherUpload selectByTime(@Param("uploadDate") Date uploadDate, @Param("areaId") String areaId);
}